API ReferenceChats
Create Vercel Project
Creates a Vercel project and attaches it to the chat.
POST/v2/chats/{chatId}/vercel-project
Usage
TypeScript Example
import { v0 } from 'v0-sdk'const result = await v0.chats.createVercelProject({ chatId: 'chat_abc123',})console.log(result)API Signature
Request
Path Parameters
chatId: string
The unique identifier of the chat.
Request Body
name?: string
Name for the Vercel project. When omitted, the chat's title is used.
Response
vercelProjectId: string
Created Vercel project ID.
Create Chat (Streaming)
Creates a new chat with a user message and returns a Server-Sent Events stream. Events include initial chat state, title deltas, content chunk deltas, and final chat state. The response is `text/event-stream`; each event is `data: <JSON>\n\n` where the JSON conforms to ChatStreamEvent.
Delete Chat
Deletes a chat and all its associated messages and blocks. The requester must have edit access to the chat.